﻿//
// Created: 2018/9/2
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.WXshopBuiness;

namespace Model.WXshopBuiness.Map
{
    internal  class WeiXinOrderMap:EntityTypeConfiguration< WeiXinOrder >    
    {
        public WeiXinOrderMap()
        {
            this.ToTable("WeiXin_Order");
            this.HasKey(i => new { i.OrderID });
            this.Property(i => i.OrderID).HasColumnName("OrderID");
            this.Property(i => i.UserID).HasColumnName("UserID");
            this.Property(i => i.OrderCode).HasColumnName("OrderCode");
            this.Property(i => i.CreateTime).HasColumnName("CreateTime");
            this.Property(i => i.OrderMoney).HasColumnName("OrderMoney");
            this.Property(i => i.OrderSource).HasColumnName("OrderSource");
            this.Property(i => i.PayType).HasColumnName("PayType");
            this.Property(i => i.AddressID).HasColumnName("AddressID");
            this.Property(i => i.OrderState).HasColumnName("OrderState");
            this.Property(i => i.Remark).HasColumnName("Remark");
            this.Property(i => i.ConfirmTime).HasColumnName("ConfirmTime");
            this.Property(i => i.ConfirmPayState).HasColumnName("ConfirmPayState");
            this.Property(i => i.SendGoodsTime).HasColumnName("SendGoodsTime");
            this.Property(i => i.SendGoodsName).HasColumnName("SendGoodsName");
            this.Property(i => i.SignTime).HasColumnName("SignTime");
            this.Property(i => i.UserName).HasColumnName("UserName");
            this.Property(i => i.Mobile).HasColumnName("Mobile");
            this.Property(i => i.AreaCode).HasColumnName("AreaCode");
            this.Property(i => i.Area).HasColumnName("Area");
            this.Property(i => i.Detail).HasColumnName("Detail");
            this.Property(i => i.KDName).HasColumnName("KDName");
            this.Property(i => i.KDCode).HasColumnName("KDCode");
            this.Property(i => i.KDMoney).HasColumnName("KDMoney");
            this.Property(i => i.UseScore).HasColumnName("UseScore");
            this.Property(i => i.UseCash).HasColumnName("UseCash");
            this.Property(i => i.UseBalance).HasColumnName("UseBalance");
            this.Property(i => i.UseCoupon).HasColumnName("UseCoupon");
            this.Property(i => i.OrderType).HasColumnName("OrderType");
            this.Property(i => i.OrderGift).HasColumnName("OrderGift");
            this.Property(i => i.CheckTime).HasColumnName("CheckTime");
            this.Property(i => i.CheckResult).HasColumnName("CheckResult");
            this.Property(i => i.OrderCommissionMoney).HasColumnName("OrderCommissionMoney");
            this.Property(i => i.Province).HasColumnName("Province");
            this.Property(i => i.City).HasColumnName("City");
            this.Property(i => i.IsSettlement).HasColumnName("IsSettlement");
            this.Property(i => i.Platform).HasColumnName("Platform");
            this.Property(i => i.ProductId).HasColumnName("ProductId");
            this.Property(i => i.UpdateTime).HasColumnName("UpdateTime");
            this.Property(i => i.OrderName).HasColumnName("OrderName");
            this.Property(i => i.IsDel).HasColumnName("IsDel");
            this.Property(i => i.PromotionID).HasColumnName("PromotionID");
            this.Property(i => i.ProductNum).HasColumnName("ProductNum");
            this.Property(i => i.ProductNum).HasColumnName("ProductNum");
            this.Property(i => i.ShopCarId).HasColumnName("ShopCarId");
            this.Property(i => i.NeedToPay).HasColumnName("NeedToPay");
            this.Property(i => i.ThatTimeSalePrice).HasColumnName("ThatTimeSalePrice");
        }
    }
    
     public static class WeiXinOrderMapExtensions
    {
        public static void UserWeiXinOrderMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new WeiXinOrderMap());
        }
    }
}